3.16 \(\int (a+b \sec ^2(e+f x))^2 \sin ^3(e+f x) \, dx\)

Optimal. Leaf size=72 \[ \frac {a^2 \cos ^3(e+f x)}{3 f}-\frac {a (a-2 b) \cos (e+f x)}{f}+\frac {b (2 a-b) \sec (e+f x)}{f}+\frac {b^2 \sec ^3(e+f x)}{3 f} \]

[Out]

-a*(a-2*b)*cos(f*x+e)/f+1/3*a^2*cos(f*x+e)^3/f+(2*a-b)*b*sec(f*x+e)/f+1/3*b^2*sec(f*x+e)^3/f

________________________________________________________________________________________

Rubi [A]  time = 0.07, antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {4133, 448} \[ \frac {a^2 \cos ^3(e+f x)}{3 f}-\frac {a (a-2 b) \cos (e+f x)}{f}+\frac {b (2 a-b) \sec (e+f x)}{f}+\frac {b^2 \sec ^3(e+f x)}{3 f} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Sec[e + f*x]^2)^2*Sin[e + f*x]^3,x]

[Out]

-((a*(a - 2*b)*Cos[e + f*x])/f) + (a^2*Cos[e + f*x]^3)/(3*f) + ((2*a - b)*b*Sec[e + f*x])/f + (b^2*Sec[e + f*x
]^3)/(3*f)

Rule 448

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Int[ExpandI
ntegrand[(e*x)^m*(a + b*x^n)^p*(c + d*x^n)^q, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && NeQ[b*c - a*d, 0] &
& IGtQ[p, 0] && IGtQ[q, 0]

Rule 4133

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*sin[(e_.) + (f_.)*(x_)]^(m_.), x_Symbol] :> With[{ff = F
reeFactors[Cos[e + f*x], x]}, -Dist[ff/f, Subst[Int[((1 - ff^2*x^2)^((m - 1)/2)*(b + a*(ff*x)^n)^p)/(ff*x)^(n*
p), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] && IntegerQ[n] && IntegerQ[p
]

Rubi steps

\begin {align*} \int \left (a+b \sec ^2(e+f x)\right )^2 \sin ^3(e+f x) \, dx &=-\frac {\operatorname {Subst}\left (\int \frac {\left (1-x^2\right ) \left (b+a x^2\right )^2}{x^4} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac {\operatorname {Subst}\left (\int \left (a (a-2 b)+\frac {b^2}{x^4}+\frac {(2 a-b) b}{x^2}-a^2 x^2\right ) \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac {a (a-2 b) \cos (e+f x)}{f}+\frac {a^2 \cos ^3(e+f x)}{3 f}+\frac {(2 a-b) b \sec (e+f x)}{f}+\frac {b^2 \sec ^3(e+f x)}{3 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.44, size = 83, normalized size = 1.15 \[ \frac {\sec ^3(e+f x) \left (-3 \left (11 a^2-64 a b+16 b^2\right ) \cos (2 (e+f x))+a^2 \cos (6 (e+f x))-26 a^2-6 a (a-4 b) \cos (4 (e+f x))+168 a b-16 b^2\right )}{96 f} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sec[e + f*x]^2)^2*Sin[e + f*x]^3,x]

[Out]

((-26*a^2 + 168*a*b - 16*b^2 - 3*(11*a^2 - 64*a*b + 16*b^2)*Cos[2*(e + f*x)] - 6*a*(a - 4*b)*Cos[4*(e + f*x)]
+ a^2*Cos[6*(e + f*x)])*Sec[e + f*x]^3)/(96*f)

________________________________________________________________________________________

fricas [A]  time = 0.46, size = 67, normalized size = 0.93 \[ \frac {a^{2} \cos \left (f x + e\right )^{6} - 3 \, {\left (a^{2} - 2 \, a b\right )} \cos \left (f x + e\right )^{4} + 3 \, {\left (2 \, a b - b^{2}\right )} \cos \left (f x + e\right )^{2} + b^{2}}{3 \, f \cos \left (f x + e\right )^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^2)^2*sin(f*x+e)^3,x, algorithm="fricas")

[Out]

1/3*(a^2*cos(f*x + e)^6 - 3*(a^2 - 2*a*b)*cos(f*x + e)^4 + 3*(2*a*b - b^2)*cos(f*x + e)^2 + b^2)/(f*cos(f*x +
e)^3)

________________________________________________________________________________________

giac [A]  time = 0.40, size = 97, normalized size = 1.35 \[ \frac {6 \, a b \cos \left (f x + e\right )^{2} - 3 \, b^{2} \cos \left (f x + e\right )^{2} + b^{2}}{3 \, f \cos \left (f x + e\right )^{3}} + \frac {a^{2} f^{11} \cos \left (f x + e\right )^{3} - 3 \, a^{2} f^{11} \cos \left (f x + e\right ) + 6 \, a b f^{11} \cos \left (f x + e\right )}{3 \, f^{12}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^2)^2*sin(f*x+e)^3,x, algorithm="giac")

[Out]

1/3*(6*a*b*cos(f*x + e)^2 - 3*b^2*cos(f*x + e)^2 + b^2)/(f*cos(f*x + e)^3) + 1/3*(a^2*f^11*cos(f*x + e)^3 - 3*
a^2*f^11*cos(f*x + e) + 6*a*b*f^11*cos(f*x + e))/f^12

________________________________________________________________________________________

maple [A]  time = 0.89, size = 125, normalized size = 1.74 \[ \frac {-\frac {a^{2} \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}+2 a b \left (\frac {\sin ^{4}\left (f x +e \right )}{\cos \left (f x +e \right )}+\left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )\right )+b^{2} \left (\frac {\sin ^{4}\left (f x +e \right )}{3 \cos \left (f x +e \right )^{3}}-\frac {\sin ^{4}\left (f x +e \right )}{3 \cos \left (f x +e \right )}-\frac {\left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}\right )}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sec(f*x+e)^2)^2*sin(f*x+e)^3,x)

[Out]

1/f*(-1/3*a^2*(2+sin(f*x+e)^2)*cos(f*x+e)+2*a*b*(sin(f*x+e)^4/cos(f*x+e)+(2+sin(f*x+e)^2)*cos(f*x+e))+b^2*(1/3
*sin(f*x+e)^4/cos(f*x+e)^3-1/3*sin(f*x+e)^4/cos(f*x+e)-1/3*(2+sin(f*x+e)^2)*cos(f*x+e)))

________________________________________________________________________________________

maxima [A]  time = 0.32, size = 67, normalized size = 0.93 \[ \frac {a^{2} \cos \left (f x + e\right )^{3} - 3 \, {\left (a^{2} - 2 \, a b\right )} \cos \left (f x + e\right ) + \frac {3 \, {\left (2 \, a b - b^{2}\right )} \cos \left (f x + e\right )^{2} + b^{2}}{\cos \left (f x + e\right )^{3}}}{3 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^2)^2*sin(f*x+e)^3,x, algorithm="maxima")

[Out]

1/3*(a^2*cos(f*x + e)^3 - 3*(a^2 - 2*a*b)*cos(f*x + e) + (3*(2*a*b - b^2)*cos(f*x + e)^2 + b^2)/cos(f*x + e)^3
)/f

________________________________________________________________________________________

mupad [B]  time = 4.14, size = 66, normalized size = 0.92 \[ \frac {\frac {\frac {b^2}{3}+{\cos \left (e+f\,x\right )}^2\,\left (2\,a\,b-b^2\right )}{{\cos \left (e+f\,x\right )}^3}+\frac {a^2\,{\cos \left (e+f\,x\right )}^3}{3}-a\,\cos \left (e+f\,x\right )\,\left (a-2\,b\right )}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(e + f*x)^3*(a + b/cos(e + f*x)^2)^2,x)

[Out]

((b^2/3 + cos(e + f*x)^2*(2*a*b - b^2))/cos(e + f*x)^3 + (a^2*cos(e + f*x)^3)/3 - a*cos(e + f*x)*(a - 2*b))/f

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)**2)**2*sin(f*x+e)**3,x)

[Out]

Timed out

________________________________________________________________________________________